Optimal. Leaf size=87 \[ -\frac {\left (a+b \coth ^{-1}\left (\frac {x}{c}\right )\right )^2}{c}-\frac {\left (a+b \coth ^{-1}\left (\frac {x}{c}\right )\right )^2}{x}+\frac {2 b \left (a+b \coth ^{-1}\left (\frac {x}{c}\right )\right ) \log \left (\frac {2}{1-\frac {c}{x}}\right )}{c}+\frac {b^2 \text {PolyLog}\left (2,1-\frac {2}{1-\frac {c}{x}}\right )}{c} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 87, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {6039, 6021,
6131, 6055, 2449, 2352} \begin {gather*} -\frac {\left (a+b \coth ^{-1}\left (\frac {x}{c}\right )\right )^2}{c}-\frac {\left (a+b \coth ^{-1}\left (\frac {x}{c}\right )\right )^2}{x}+\frac {2 b \log \left (\frac {2}{1-\frac {c}{x}}\right ) \left (a+b \coth ^{-1}\left (\frac {x}{c}\right )\right )}{c}+\frac {b^2 \text {Li}_2\left (1-\frac {2}{1-\frac {c}{x}}\right )}{c} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2352
Rule 2449
Rule 6021
Rule 6039
Rule 6055
Rule 6131
Rubi steps
\begin {align*} \int \frac {\left (a+b \tanh ^{-1}\left (\frac {c}{x}\right )\right )^2}{x^2} \, dx &=\int \left (\frac {\left (2 a-b \log \left (1-\frac {c}{x}\right )\right )^2}{4 x^2}+\frac {b \left (2 a-b \log \left (1-\frac {c}{x}\right )\right ) \log \left (1+\frac {c}{x}\right )}{2 x^2}+\frac {b^2 \log ^2\left (1+\frac {c}{x}\right )}{4 x^2}\right ) \, dx\\ &=\frac {1}{4} \int \frac {\left (2 a-b \log \left (1-\frac {c}{x}\right )\right )^2}{x^2} \, dx+\frac {1}{2} b \int \frac {\left (2 a-b \log \left (1-\frac {c}{x}\right )\right ) \log \left (1+\frac {c}{x}\right )}{x^2} \, dx+\frac {1}{4} b^2 \int \frac {\log ^2\left (1+\frac {c}{x}\right )}{x^2} \, dx\\ &=-\left (\frac {1}{4} \text {Subst}\left (\int (2 a-b \log (1-c x))^2 \, dx,x,\frac {1}{x}\right )\right )-\frac {1}{2} b \text {Subst}\left (\int (2 a-b \log (1-c x)) \log (1+c x) \, dx,x,\frac {1}{x}\right )-\frac {1}{4} b^2 \text {Subst}\left (\int \log ^2(1+c x) \, dx,x,\frac {1}{x}\right )\\ &=-\frac {b \left (2 a-b \log \left (1-\frac {c}{x}\right )\right ) \log \left (\frac {c+x}{x}\right )}{2 x}+\frac {\text {Subst}\left (\int (2 a-b \log (x))^2 \, dx,x,1-\frac {c}{x}\right )}{4 c}-\frac {b^2 \text {Subst}\left (\int \log ^2(x) \, dx,x,1+\frac {c}{x}\right )}{4 c}+\frac {1}{2} (b c) \text {Subst}\left (\int \frac {x (2 a-b \log (1-c x))}{1+c x} \, dx,x,\frac {1}{x}\right )+\frac {1}{2} \left (b^2 c\right ) \text {Subst}\left (\int \frac {x \log (1+c x)}{1-c x} \, dx,x,\frac {1}{x}\right )\\ &=\frac {\left (1-\frac {c}{x}\right ) \left (2 a-b \log \left (1-\frac {c}{x}\right )\right )^2}{4 c}-\frac {b \left (2 a-b \log \left (1-\frac {c}{x}\right )\right ) \log \left (\frac {c+x}{x}\right )}{2 x}-\frac {b^2 \left (1+\frac {c}{x}\right ) \log ^2\left (\frac {c+x}{x}\right )}{4 c}+\frac {b \text {Subst}\left (\int (2 a-b \log (x)) \, dx,x,1-\frac {c}{x}\right )}{2 c}+\frac {b^2 \text {Subst}\left (\int \log (x) \, dx,x,1+\frac {c}{x}\right )}{2 c}+\frac {1}{2} (b c) \text {Subst}\left (\int \left (\frac {2 a-b \log (1-c x)}{c}-\frac {2 a-b \log (1-c x)}{c (1+c x)}\right ) \, dx,x,\frac {1}{x}\right )+\frac {1}{2} \left (b^2 c\right ) \text {Subst}\left (\int \left (-\frac {\log (1+c x)}{c}-\frac {\log (1+c x)}{c (-1+c x)}\right ) \, dx,x,\frac {1}{x}\right )\\ &=-\frac {a b}{x}-\frac {b^2}{2 x}+\frac {\left (1-\frac {c}{x}\right ) \left (2 a-b \log \left (1-\frac {c}{x}\right )\right )^2}{4 c}+\frac {b^2 \left (1+\frac {c}{x}\right ) \log \left (\frac {c+x}{x}\right )}{2 c}-\frac {b \left (2 a-b \log \left (1-\frac {c}{x}\right )\right ) \log \left (\frac {c+x}{x}\right )}{2 x}-\frac {b^2 \left (1+\frac {c}{x}\right ) \log ^2\left (\frac {c+x}{x}\right )}{4 c}+\frac {1}{2} b \text {Subst}\left (\int (2 a-b \log (1-c x)) \, dx,x,\frac {1}{x}\right )-\frac {1}{2} b \text {Subst}\left (\int \frac {2 a-b \log (1-c x)}{1+c x} \, dx,x,\frac {1}{x}\right )-\frac {1}{2} b^2 \text {Subst}\left (\int \log (1+c x) \, dx,x,\frac {1}{x}\right )-\frac {1}{2} b^2 \text {Subst}\left (\int \frac {\log (1+c x)}{-1+c x} \, dx,x,\frac {1}{x}\right )-\frac {b^2 \text {Subst}\left (\int \log (x) \, dx,x,1-\frac {c}{x}\right )}{2 c}\\ &=-\frac {b^2}{x}-\frac {b^2 \left (1-\frac {c}{x}\right ) \log \left (1-\frac {c}{x}\right )}{2 c}+\frac {\left (1-\frac {c}{x}\right ) \left (2 a-b \log \left (1-\frac {c}{x}\right )\right )^2}{4 c}-\frac {b \left (2 a-b \log \left (1-\frac {c}{x}\right )\right ) \log \left (\frac {c+x}{2 x}\right )}{2 c}+\frac {b^2 \left (1+\frac {c}{x}\right ) \log \left (\frac {c+x}{x}\right )}{2 c}-\frac {b \left (2 a-b \log \left (1-\frac {c}{x}\right )\right ) \log \left (\frac {c+x}{x}\right )}{2 x}-\frac {b^2 \log \left (-\frac {c-x}{2 x}\right ) \log \left (\frac {c+x}{x}\right )}{2 c}-\frac {b^2 \left (1+\frac {c}{x}\right ) \log ^2\left (\frac {c+x}{x}\right )}{4 c}+\frac {1}{2} b^2 \text {Subst}\left (\int \frac {\log \left (\frac {1}{2} (1-c x)\right )}{1+c x} \, dx,x,\frac {1}{x}\right )-\frac {1}{2} b^2 \text {Subst}\left (\int \log (1-c x) \, dx,x,\frac {1}{x}\right )+\frac {1}{2} b^2 \text {Subst}\left (\int \frac {\log \left (\frac {1}{2} (1+c x)\right )}{1-c x} \, dx,x,\frac {1}{x}\right )-\frac {b^2 \text {Subst}\left (\int \log (x) \, dx,x,1+\frac {c}{x}\right )}{2 c}\\ &=-\frac {b^2}{2 x}-\frac {b^2 \left (1-\frac {c}{x}\right ) \log \left (1-\frac {c}{x}\right )}{2 c}+\frac {\left (1-\frac {c}{x}\right ) \left (2 a-b \log \left (1-\frac {c}{x}\right )\right )^2}{4 c}-\frac {b \left (2 a-b \log \left (1-\frac {c}{x}\right )\right ) \log \left (\frac {c+x}{2 x}\right )}{2 c}-\frac {b \left (2 a-b \log \left (1-\frac {c}{x}\right )\right ) \log \left (\frac {c+x}{x}\right )}{2 x}-\frac {b^2 \log \left (-\frac {c-x}{2 x}\right ) \log \left (\frac {c+x}{x}\right )}{2 c}-\frac {b^2 \left (1+\frac {c}{x}\right ) \log ^2\left (\frac {c+x}{x}\right )}{4 c}-\frac {b^2 \text {Subst}\left (\int \frac {\log \left (1-\frac {x}{2}\right )}{x} \, dx,x,1-\frac {c}{x}\right )}{2 c}+\frac {b^2 \text {Subst}\left (\int \frac {\log \left (1-\frac {x}{2}\right )}{x} \, dx,x,1+\frac {c}{x}\right )}{2 c}+\frac {b^2 \text {Subst}\left (\int \log (x) \, dx,x,1-\frac {c}{x}\right )}{2 c}\\ &=\frac {\left (1-\frac {c}{x}\right ) \left (2 a-b \log \left (1-\frac {c}{x}\right )\right )^2}{4 c}-\frac {b \left (2 a-b \log \left (1-\frac {c}{x}\right )\right ) \log \left (\frac {c+x}{2 x}\right )}{2 c}-\frac {b \left (2 a-b \log \left (1-\frac {c}{x}\right )\right ) \log \left (\frac {c+x}{x}\right )}{2 x}-\frac {b^2 \log \left (-\frac {c-x}{2 x}\right ) \log \left (\frac {c+x}{x}\right )}{2 c}-\frac {b^2 \left (1+\frac {c}{x}\right ) \log ^2\left (\frac {c+x}{x}\right )}{4 c}+\frac {b^2 \text {Li}_2\left (-\frac {c-x}{2 x}\right )}{2 c}-\frac {b^2 \text {Li}_2\left (\frac {c+x}{2 x}\right )}{2 c}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.13, size = 101, normalized size = 1.16 \begin {gather*} \frac {b^2 (-c+x) \tanh ^{-1}\left (\frac {c}{x}\right )^2+2 b \tanh ^{-1}\left (\frac {c}{x}\right ) \left (-a c+b x \log \left (1+e^{-2 \tanh ^{-1}\left (\frac {c}{x}\right )}\right )\right )+a \left (-a c+2 b x \log \left (\frac {1}{\sqrt {1-\frac {c^2}{x^2}}}\right )\right )-b^2 x \text {PolyLog}\left (2,-e^{-2 \tanh ^{-1}\left (\frac {c}{x}\right )}\right )}{c x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.58, size = 137, normalized size = 1.57
method | result | size |
derivativedivides | \(-\frac {\frac {c \,a^{2}}{x}+\frac {\arctanh \left (\frac {c}{x}\right )^{2} b^{2} c}{x}-2 \ln \left (1+\frac {\left (1+\frac {c}{x}\right )^{2}}{1-\frac {c^{2}}{x^{2}}}\right ) \arctanh \left (\frac {c}{x}\right ) b^{2}+b^{2} \arctanh \left (\frac {c}{x}\right )^{2}-\polylog \left (2, -\frac {\left (1+\frac {c}{x}\right )^{2}}{1-\frac {c^{2}}{x^{2}}}\right ) b^{2}+\frac {2 a b c \arctanh \left (\frac {c}{x}\right )}{x}+a b \ln \left (1-\frac {c^{2}}{x^{2}}\right )}{c}\) | \(137\) |
default | \(-\frac {\frac {c \,a^{2}}{x}+\frac {\arctanh \left (\frac {c}{x}\right )^{2} b^{2} c}{x}-2 \ln \left (1+\frac {\left (1+\frac {c}{x}\right )^{2}}{1-\frac {c^{2}}{x^{2}}}\right ) \arctanh \left (\frac {c}{x}\right ) b^{2}+b^{2} \arctanh \left (\frac {c}{x}\right )^{2}-\polylog \left (2, -\frac {\left (1+\frac {c}{x}\right )^{2}}{1-\frac {c^{2}}{x^{2}}}\right ) b^{2}+\frac {2 a b c \arctanh \left (\frac {c}{x}\right )}{x}+a b \ln \left (1-\frac {c^{2}}{x^{2}}\right )}{c}\) | \(137\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a + b \operatorname {atanh}{\left (\frac {c}{x} \right )}\right )^{2}}{x^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (a+b\,\mathrm {atanh}\left (\frac {c}{x}\right )\right )}^2}{x^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________